<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>EasyBuy后台管理</title>
    <!--<link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">-->
    <!--<script src="${pageContext.request.contextPath}/layui/layui.js"></script>-->
    <link rel="stylesheet" href="../../../lib/layui/css/layui.css">
    <script src="../../../lib/layui/layui.js"></script>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>订单管理</legend>
        </fieldset>
    </div>
    <hr class="layui-bg-red">

    <!--按钮及查询框组-->
    <div class="layui-row">
        <div class="layui-col-md-offset2">
            <div class="layui-inline">
                <input class="layui-input" name="id" autocomplete="off" placeholder="订单编号">
            </div>
            <div class="layui-inline">
                <input class="layui-input" name="id" autocomplete="off" placeholder="订单时间">
            </div>
            <div class="layui-inline">
                <input class="layui-input" name="id" autocomplete="off" placeholder="订单状态">
            </div>
            <div class="layui-inline">
                <input class="layui-input" name="id" autocomplete="off" placeholder="订货人">
            </div>
            <button class="layui-btn layuiadmin-btn-admin" lay-submit="" lay-filter="LAY-user-back-search">
                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
        </div>
    </div>

    <hr>

    <!--表格-->
    <table class="layui-hide" id="gitLogs"></table>

    <script type="text/html" id="lineBar">
        <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
</div>
<script>
    /*配置表格内容，以及加载数据*/
    layui.use('table', function () {
        var table = layui.table;

        table.render({
            elem: '#gitLogs'
            , url: 'order.json'
            , cellMinWidth: 100
            , cols: [[
                {checkbox: true, field: 'id', title: 'ID'}
                , {field: 'productid', title: '订单编号'}
                , {field: 'productname', title: '商品名称'}
                , {field: 'price', title: '订单单价'}
                , {field: 'number', title: '订单数量'}
                , {field: 'prodecttime', title: '订单时间'}
                , {field: 'status', title: '订单状态'}
                , {field: 'orderer', title: '订货人'}
                , {field: 'total', title: '总计'}
                , {fixed: 'right', toolbar: '#lineBar', width: 200, align: 'center'}
            ]]
            , page:{
                layout: ['limit', 'count', 'prev', 'page', 'next', 'skip']
                ,groups: 5
            }
        });
    });
</script>
</body>
</html>